package com.lahuan;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import javax.sql.DataSource;

/**
 * @author linfy
 */
@Slf4j
@EnableSwagger2
@SpringBootApplication
public class BaseSpringBootApplication {


    public static void main(String[] args) {
        ConfigurableApplicationContext ctx = SpringApplication.run(BaseSpringBootApplication.class, args);
        DataSource dataSource = ctx.getBean(DataSource.class);
        log.info("当前使用的数据源:"+dataSource.getClass());
    }

}
